Identifying corrupted text segments

ABSTRACT

A computer system for taking a corrective action upon determination of an existence of a corrupted text segment within a set of web pages. Determination includes: determining a language affinity indicator corresponding to text segments within the set of web pages; generating an indexing repository based on a set of text artefacts within the text segments; creating an occurrence table for the set of text artefacts; and determining compliance of the text artefacts and text segments based on the single language grouping on which the set of text segments are based.

BACKGROUND

The present invention relates generally to the field of text segmentanalysis, and more particularly to identifying text segments that arecorrupted.

Identifying corrupted text segments is important for applications thatare involved in transmission and/or rendering of such text segments.Corrupted text segments could be a sign of software failure in computerapplications such as networking applications, web security applications,or web browsers. Developers and users of computer systems continue toface difficulties with inefficient methods of identifying corrupted textsegments.

SUMMARY

A computer system includes: selecting a set of web pages containing textassociated with a single language grouping; determining a set of textsegments within the set of web pages; determining a language affinityindicator corresponding to each text segment in the set of textsegments, the language affinity indicator being a comparison value of atext segment with a set of predefined rules corresponding to the singlelanguage grouping; responsive to each language affinity indicatorindicating an affinity to the single language grouping, identifying aset of text artefacts within the text segments; generating an indexingrepository based on the set of text artefacts; creating an occurrencetable from the indexing repository; determining a compliance thresholdvalue for the occurrence table; identifying an individual occurrencevalue for each unique text artefact in the set of text artefacts, theindividual occurrence value being the probability that a text artefactoccurs within the occurrence table based on the single languagegrouping; and determining a compliance value for the set of textsegments by, for each text segment in the set of text segments:computing a compliance sum value for a first text segment in the set oftext segments, adjusting the compliance sum value according to theindividual occurrence values of a subset of text artefacts occurring inthe first text segment, determining a segment length value associatedwith the first text segment, and adjusting the compliance sum valueaccording to the segment length value; responsive to computing a set ofcompliance sum values for each text segment in the set of text segments,computing the compliance value based on an average value of the set ofcompliance sum values; computing a compliance indicator for the set oftext segments by comparing the compliance value and the compliancethreshold; and responsive to the compliance indicator indicating thatthe compliance value is less than the compliance threshold, taking acorrective action. The corrective action is an action selected from thegroup consisting of: notifying a user of a corrupted set of textsegments in the selected set of web pages, and preventing the selectedset of web pages from being accessed again.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of one embodiment of a computer systemenvironment suitable for operation of a text corruption identificationprogram, in accordance with at least one embodiment of the presentinvention.

FIG. 2 is a data-flow diagram of a text corruption identificationprogram, in accordance with at least one embodiment of the presentinvention.

FIG. 3 is a flow-chart diagram of a text corruption identificationprogram, in accordance with at least one embodiment of the presentinvention.

FIG. 4 is an operational example of data contained in alanguage-specific occurrence database, in accordance with at least oneembodiment of the present invention.

FIG. 5 is a block diagram of a computing apparatus suitable forexecuting a text corruption identification program, in accordance withat least one embodiment of the present invention.

DETAILED DESCRIPTION

FIG. 1 is a block diagram of a computer system environment 100 suitablefor operating a text corruption identification program 110, inaccordance with at least one embodiment of the present invention. In thecomputer system environment 100 depicted in FIG. 1, a text segment 121is any collection of one or more text artefacts, whether storedcontiguously or non-contiguously and whether stored in one computerreadable storage media unit or in a distributed manner. In at least someembodiments, a text artefact is any computer representation of at leastone grapheme unit (such as an alphabetical character), grapheme-likeunit (such as digits), and/or symbol unit (such as a pentation ormathematical symbol). In at least some embodiments, a text artefact is acombination of one or more characters defined in one or more textencoding schemes (such as one or more Unicode encoding schemes). In atleast some embodiments, a text artefact also includes a predefined orderand/or one or more predefined rules for determining the order of one ormore characters defined in one or more particular Unicode encodingschemes.

In the computer system environment 100 depicted in FIG. 1, alanguage-specific occurrence database 122 is any collection of one ormore information artefacts that relate and/or associate one or more textartefacts to one or more language-specific occurrence values. In atleast some embodiments, the language-specific occurrence database isassociated with at least one language grouping. In at least someembodiments, a language grouping is defined by one or more the textartefacts available and/or usable in the language grouping as well as arepresentation and/or an approximation of the probability that each ofthe one or more text artefacts occurs within at least one languagegrouping. In at least some embodiments, each of the one or morelanguage-specific occurrence values represents and/or approximates theprobability that a particular text artefact occurs within the at leastone language grouping associated with the language-specific occurrencedatabase 122.

In the computer system environment 100 depicted in FIG. 1, the textcorruption identification program 110 uses the text segment 121 and thelanguage-specific occurrence database 122 to determine alanguage-specific compliance value 150 associated with the text segment121. In at least some embodiments, the language-specific compliancevalue 150 is a representation and/or approximation of whether the textsegment 121 belongs to the at the at least one language groupingassociated with the language-specific occurrence database 122.

FIG. 2 is a data-flow diagram of a text corruption identificationprogram 110, in accordance with at least one embodiment of the presentinvention. In the embodiment depicted in FIG. 2, the program 110 usesthe one or more text artefacts 221 (determined based on the text segment121) and the language-specific occurrence database 122 to determine alanguage-specific occurrence value 250 for each text artefact 221. Theprogram 110 uses the language-specific occurrence values 250 determinedfor each text artefact 221 to determine a language-specific compliancevalue 150 associated with the text segment 121 (e.g., by averaging thelanguage-specific occurrence values 250 of the one or more textartefacts 221 or averaging the language-specific occurrence values 250of the one or more text artefacts 221 and dividing the average by avalue representing the length of the text segment 121).

FIG. 3 is a flow-chart diagram of a text corruption identificationprogram, in accordance with at least one embodiment of the presentinvention. At step 300, the program identifies a text segment comprisingone or more text artefacts. At step 301, the program determines alanguage-specific occurrence database associated with the text segment.At step 302, for each of the one or more text artefacts, the programdetermines a language specific occurrence value based on thelanguage-specific occurrence database (at sub-step 312). At step 303,the program determines a language-specific compliance value based oneach language-specific occurrence value.

FIG. 4 is an operational example of data contained in alanguage-specific occurrence database, in accordance with at least oneembodiment of the present invention. In the embodiment depicted in FIG.4, column 221 contains text artefacts and column 250 contains thelanguage-specific occurrence values 250 associated with the textartefacts 221. As such, text artefact “a” 411 has a language-specificoccurrence value 0.6; text artefact “B” 412 has a language-specificoccurrence value 0.5; text artefact “@” 413 has a language-specificoccurrence value 0.1; text artefact “$” 414 has a language-specificoccurrence value 0.05; text artefact “€” 415 has a language-specificoccurrence value 0.06; text artefact “£” 416 has a language-specificoccurrence value 0.08; and text artefact “Π” 417 has a language-specificoccurrence value 0.001.

In some embodiments, determining the language-specific occurrence valuecomprises: (i) identifying a segment length value associated with thetext segment; (ii) identifying a compliance sum value associated withthe text segment; (iii) for each of the one or more text artefacts,adjusting the compliance sum value by the language-specific occurrencevalue; and (iv) adjusting the language-specific compliance value by thesegment length value. In at least some embodiments, a segment lengthvalue is any representation and/or approximation of the number of textartefacts and/or text characters in a text segment. In at least someembodiments, a compliance sum value associated with a text segment isany representation and/or approximation of the number oflanguage-specific occurrence values associated with one or more textartefacts in the text segment. In some embodiments, adjusting thelanguage-specific compliance value by a language-specific occurrencevalue includes adding the language-specific occurrence value to thecompliance sum value. In some embodiments, adjusting thelanguage-specific compliance value by the segment length value includesdividing the language-specific compliance value by the segment lengthvalue. In some embodiments, identifying a segment length value comprisesdetermining the segment length value. In some embodiments, identifying acompliance sum value comprises determining the compliance sum value.

In some embodiments, the text corruption identification program furthercomprises identifying a compliance threshold associated with thelanguage-specific occurrence database and determining a complianceindicator based on the language-specific compliance value and thecompliance threshold. In at least some embodiments, a compliancethreshold associated with the language-specific occurrence database isany representation and/or approximation of the minimum language-specificcompliance value required for compliance with the language grouping towhich the language-specific occurrence database belongs, such that ifthe language-specific compliance value associated with a text segment issmaller than the compliance threshold the text segment is considered tonot comply with the language grouping to which the language-specificoccurrence database belongs. In at least some embodiments, a complianceindicator is any representation and/or approximation of whether a textsegment complies with a language grouping to which the language-specificoccurrence database belongs. In at least some embodiments, identifying acompliance threshold comprises determining the compliance threshold. Inat least some embodiments, determining a compliance indicator based onthe compliance value and the language-specific compliance thresholdcomprises: (i) determining a compliance indicator denoting that the textsegment complies with a language grouping to which the language-specificoccurrence database belongs if the language-specific compliance equalsor exceeds the compliance threshold; and (ii) determining a complianceindicator denoting that the text segment does not comply with a languagegrouping to which the language-specific occurrence database belongs ifthe language-specific compliance falls below the compliance threshold.

In some embodiments, the text corruption identification program furthercomprises, responsive to the compliance indicator indicating that saidcompliance value is less than said compliance threshold, determining atleast one corrective action selected from the group consisting of: (i)notifying at least ones viewer of said text segment; (ii) downloadingsaid text segment again; and (iii) preventing said text segment frombeing accessed again. In some embodiments, the program further comprisesdetermining an indexing repository based on at least one webpage; andwherein determining the language-specific occurrence database isperformed based on the indexing repository. In at least someembodiments, an indexing repository associated with at least one webpageis any indication of part or all of the contents of the at least onewebpage.

In some embodiments, determining the language-specific occurrencedatabase comprises identifying at least one language grouping associatedwith the language-specific occurrence database and, for each of the atleast one language grouping, determining a language affinity indicatorassociated with the text segment. In at least some embodiments, anaffinity indicator associated with a language grouping and the textsegment is any representation and/or approximation of whether the textsegment belongs to and/or complies with the rules of the languagegrouping. In some embodiments, the text corruption identificationprogram further comprises identifying a text file which comprises thetext segment, identifying an overall compliance value associated withthe text file, and adjusting the overall compliance value based on thelanguage-specific compliance value. In at least some embodiments, theoverall compliance value associated with a text file is a representationand/or approximation of whether the text file belongs to the at the atleast one language grouping associated with the language-specificoccurrence database.

In general, one or more steps associated with different embodiments ofthe text corruption identification program may be performed based on oneor more pieces of information obtained directly or indirectly from oneor more computer (hardware or software) components, one or more piecesof information obtained directly or indirectly from one or more inputsfrom one or more users, and/or one or more observed behaviors associatedwith one or more (hardware or software) components of one or morecomputer system environments. In general, one or more steps of differentembodiments of the text corruption identification program may comprisecommunicating with one or more computer (hardware or software)components, issuing one or more computer instructions (e.g., one or morespecial purpose machine-level instructions defined in the instructionset of one or more computer hardware components), and/or communicatingwith one or more computer components at the hardware level.

Aspects of the present invention enable identifying corrupted textsegments in a manner that involves using existing web resources andpreprocessed data, and as such does not involve using extensivereal-time analysis of a text segment or costly statistical learningsolutions. Nevertheless, the aforementioned advantages are not requiredto be present in all of the embodiments of the invention and may not bepresent in all of the embodiments of the invention.

FIG. 5 is a block diagram depicting components of a computer 500suitable for executing the text corruption identification program. FIG.5 displays the computer 500, the one or more processor(s) 504 (includingone or more computer processors), the communications fabric 502, thememory 506, the RAM, the cache 516, the persistent storage 508, thecommunications unit 510, the I/O interfaces 512, the display 520, andthe external devices 518. It should be appreciated that FIG. 5 providesonly an illustration of one embodiment and does not imply anylimitations with regard to the environments in which differentembodiments may be implemented. Many modifications to the depictedenvironment may be made.

As depicted, the computer 500 operates over a communications fabric 502,which provides communications between the cache 516, the computerprocessor(s) 504, the memory 506, the persistent storage 508, thecommunications unit 510, and the input/output (I/O) interface(s) 512.The communications fabric 502 may be implemented with any architecturesuitable for passing data and/or control information between theprocessors 504 (e.g., microprocessors, communications processors, andnetwork processors, etc.), the memory 506, the external devices 518, andany other hardware components within a system. For example, thecommunications fabric 502 may be implemented with one or more buses or acrossbar switch.

The memory 506 and persistent storage 508 are computer readable storagemedia. In the depicted embodiment, the memory 506 includes a randomaccess memory (RAM). In general, the memory 506 may include any suitablevolatile or non-volatile implementations of one or more computerreadable storage media. The cache 516 is a fast memory that enhances theperformance of computer processor(s) 504 by holding recently accesseddata, and data near accessed data, from memory 506.

Program instructions for the text corruption identification program maybe stored in the persistent storage 508 or in memory 506, or moregenerally, any computer readable storage media, for execution by one ormore of the respective computer processors 504 via the cache 516. Thepersistent storage 508 may include a magnetic hard disk drive.Alternatively, or in addition to a magnetic hard disk drive, thepersistent storage 508 may include, a solid state hard disk drive, asemiconductor storage device, read-only memory (ROM), electronicallyerasable programmable read-only memory (EEPROM), flash memory, or anyother computer readable storage media that is capable of storing programinstructions or digital information.

The media used by the persistent storage 508 may also be removable. Forexample, a removable hard drive may be used for persistent storage 508.Other examples include optical and magnetic disks, thumb drives, andsmart cards that are inserted into a drive for transfer onto anothercomputer readable storage medium that is also part of the persistentstorage 508.

The communications unit 510, in these examples, provides forcommunications with other data processing systems or devices. In theseexamples, the communications unit 510 may include one or more networkinterface cards. The communications unit 510 may provide communicationsthrough the use of either or both physical and wireless communicationslinks. The text corruption identification program may be downloaded tothe persistent storage 508 through the communications unit 510. In thecontext of some embodiments of the present invention, the source of thevarious input data may be physically remote to the computer 500 suchthat the input data may be received and the output similarly transmittedvia the communications unit 510.

The I/O interface(s) 512 allows for input and output of data with otherdevices that may operate in conjunction with the computer 500. Forexample, the I/O interface 512 may provide a connection to the externaldevices 518, which may include a keyboard, keypad, a touch screen,and/or some other suitable input devices. External devices 518 may alsoinclude portable computer readable storage media, for example, thumbdrives, portable optical or magnetic disks, and memory cards. Softwareand data used to practice embodiments of the present invention may bestored on such portable computer readable storage media and may beloaded onto the persistent storage 508 via the I/O interface(s) 512. TheI/O interface(s) 512 may similarly connect to a display 520. The display520 provides a mechanism to display data to a user and may be, forexample, a computer monitor.

The programs described herein are identified based upon the applicationfor which they are implemented in a specific embodiment of theinvention. However, it should be appreciated that any particular programnomenclature herein is used merely for convenience, and thus theinvention should not be limited to use solely in any specificapplication identified and/or implied by such nomenclature.

The present invention may be a system, a method, and/or a computerprogram product at any possible technical detail level of integration.The computer program product may include a computer readable storagemedium (or media) having computer readable program instructions thereonfor causing a processor to carry out aspects of the present invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, configuration data for integrated circuitry, oreither source code or object code written in any combination of one ormore programming languages, including an object oriented programminglanguage such as Smalltalk, C++, or the like, and procedural programminglanguages, such as the “C” programming language or similar programminglanguages. The computer readable program instructions may executeentirely on the user's computer, partly on the user's computer, as astand-alone software package, partly on the user's computer and partlyon a remote computer or entirely on the remote computer or server. Inthe latter scenario, the remote computer may be connected to the user'scomputer through any type of network, including a local area network(LAN) or a wide area network (WAN), or the connection may be made to anexternal computer (for example, through the Internet using an InternetService Provider). In some embodiments, electronic circuitry including,for example, programmable logic circuitry, field-programmable gatearrays (FPGA), or programmable logic arrays (PLA) may execute thecomputer readable program instructions by utilizing state information ofthe computer readable program instructions to personalize the electroniccircuitry, in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the blocks may occur out of theorder noted in the Figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

What is claimed is:
 1. A computer system comprising: one or morecomputer processors; one or more computer readable storage device;program instructions stored on the one or more computer readable storagedevices for execution by at least one of the one or more computerprocessors, the stored program instructions comprising: programinstructions to select a set of web pages containing text associatedwith a single language grouping; program instructions to determine a setof text segments within the set of web pages; program instructions todetermine a language affinity indicator corresponding to each textsegment in the set of text segments, the language affinity indicatorbeing a comparison value of a text segment with a set of predefinedrules corresponding to the single language grouping; programinstructions to, responsive to each language affinity indicatorindicating an affinity to the single language grouping, identify a setof text artefacts within the text segments; program instructions togenerate an indexing repository based on the set of text artefacts;program instructions to create an occurrence table from the indexingrepository; program instructions to determine a compliance thresholdvalue for the occurrence table; program instructions to identify anindividual occurrence value for each unique text artefact in the set oftext artefacts, the individual occurrence value being the probabilitythat a text artefact occurs within the occurrence table based on thesingle language grouping; and program instructions to determine acompliance value for the set of text segments by, for each text segmentin the set of text segments: program instructions to compute acompliance sum value for a first text segment in the set of textsegments; program instructions to adjust the compliance sum valueaccording to the individual occurrence values of a subset of textartefacts occurring in the first text segment; program instructions todetermine a segment length value associated with the first text segment;and program instructions to adjust the compliance sum value according tothe segment length value; program instructions to, responsive tocomputing a set of compliance sum values for each text segment in theset of text segments, compute the compliance value based on an averagevalue of the set of compliance sum values; program instructions tocompute a compliance indicator for the set of text segments by comparingthe compliance value and the compliance threshold; and programinstructions to, responsive to the compliance indicator indicating thatthe compliance value is less than the compliance threshold, take acorrective action; wherein: the corrective action is an action selectedfrom the group consisting of: notifying a user of a corrupted set oftext segments in the selected set of web pages; and preventing theselected set of web pages from being accessed again.